﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FigureDraw.Shapes
{
    public class MyText : MyShape
    {
        string text;
        double size;

        public MyText()
            : base()
        {
        }

        public MyText(MyPoint position, string text, double size)
        {
            this.startPoint = position;
            this.text = text;
            this.size = size;
        }

        public override void Draw(Graphic.CommonGraphic graphic)
        {
            graphic.DrawText(startPoint, text, size, strokeColor);
        }

        public override MyShape Clone(Diagram.BlockDiagram diagram)
        {
            return this;
        }

        public override MyShape Clone()
        {
            MyShape shape = new MyText(startPoint, text, size);
            shape.StrokeColor = strokeColor;
            shape.StrokeWidth = strokeWidth;

            return shape;
        }
    }
}
